﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace KMeanDataGen
{
    class VectorDataGen
    {
        static void Main(string[] args)
        {
            const int vectorLength = 20;
            const int count = 1000;
            string filename = "setsmall";
            Random random = new Random();
            for (int j=0; j < 256; j++)
            {
                FileStream fileStream = new FileStream(filename+"_"+j+"len"+vectorLength, FileMode.OpenOrCreate);
                BinaryWriter writer = new BinaryWriter(fileStream);
                
                writer.Write(count);
                writer.Write(vectorLength);
                writer.Write(true);

                for (int k=0; k < count; k++)
                {
                    writer.Write(k);
                    for (int i = 0; i < vectorLength; i++)
                    {
                        writer.Write(((double)random.Next(1000)));
                        //writer.Write((double)k*10);
                    }
                }
                writer.Close();
            }
            //Console.In.ReadLine();
        }

    }
}
